﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Globalization;
using System.Threading;

namespace IDE_week2_Forms_project
{
    public partial class Form1 : Form
    {
        Form form2;

        public Form1()
        {
            InitializeComponent();
           // form2.Icon = Properties.Resources.Icon2;
        }
        int counter = 0;

        private void button4_Click(object sender, EventArgs e)
        {
            form2 = new Form();
            form2.Show();

        }

        private void button1_Click(object sender, EventArgs e)
        {
            Icon = Properties.Resources.Icon1;
            form2.Icon = Properties.Resources.Icon2;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Icon = default(Icon);

        }

        private void button3_Click(object sender, EventArgs e)
        {
            if (counter == 0)
            {
                ChangeLanguage("nl");
                counter = 1;
            }
            else
            {
                if (counter == 1)
                {
                    ChangeLanguage("en");
                    counter = 2;
                }
                else if(counter == 2)
                {
                    ChangeLanguage("nl-BE");
                        counter = 0;
                }
            }
			if (int i ==0)
			{
			 
			 int me = i;
			 i++;
			
			}
        }
        
            private void ChangeLanguage(string nl)
{
  foreach (Control c in this.Controls)
  {
    ComponentResourceManager resources = 
          new ComponentResourceManager(typeof(Form1));
    resources.ApplyResources(c,c.Name,new CultureInfo(nl));
  }
}

            private void label1_Click(object sender, EventArgs e)
            {
                
            }

            private void button5_Click(object sender, EventArgs e)
            {
                int[] numbers = new int[10];
                Class1.MakeRandomNumber(numbers);
                label1.Text = numbers[0] + ", " + numbers[1] + "," + numbers[2];
            }

       
    }
}
